package com.example.associationmanager.bean;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

@Data//生成get,set
@TableName("association_user")
public class User {
    @TableId(value = "user_id",type = IdType.AUTO)
    private Integer userId;//用户id
    private String userName;//用户名
    private String userAccountNumber;//账号
    private String userPassword;//密码
    private Integer userAuth;//用户拥有的权限
    private Integer userStatus;//用户状态
    //该注解意思是可以设置为空值
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Integer communityNumber;//用户所属社团
    //无所属社团，暂时使用，除超管外其余用户必须选择所属社团
    public User(Integer userId, String userName, String userAccountNumber, String userPassword, Integer userAuth, Integer userStatus) {
        this.userId = userId;
        this.userName = userName;
        this.userAccountNumber = userAccountNumber;
        this.userPassword = userPassword;
        this.userAuth = userAuth;
        this.userStatus = userStatus;
    }
    //包含所属社团
    public User(Integer userId, String userName, String userAccountNumber, String userPassword, Integer userAuth, Integer userStatus, Integer communityNumber) {
        this.userId = userId;
        this.userName = userName;
        this.userAccountNumber = userAccountNumber;
        this.userPassword = userPassword;
        this.userAuth = userAuth;
        this.userStatus = userStatus;
        this.communityNumber = communityNumber;
    }

    public User() {
    }
}
